<template>
    <div>
   
        <div style="visibility:hidden;">
            <div style="float:left">
                <Input style="width:250px">
                <span slot="prepend">学院名称：</span>
                <Button slot="append" icon="ios-search"></Button>
                </Input>
            </div>
    
            <Button-group>
                <Button @click="modal_add_status = true">新增</Button>
                <Button @click="exportData(2)">导出</Button>
            </Button-group>
        </div>
        <Table border stripe :columns="header" :data="data_list" size="small" ref="table" class="table"></Table>
    
    </div>
</template>
<script>
export default {
    data() {
        return {

            //初始化url
            init_url: '/mes/core/app/all?id=',

            //表格标题
            header: [
                {
                    type: 'index',
                    width: 60,
                    align: 'center'
                },
                {
                    "title": "学院名称",
                    "key": "instituteName",
                    "width": 120,
                    "sortable": true,
                },
                {
                    "title": "应用名称",
                    "key": "appName",
                    "width": 120,
                    "sortable": true,
                },
                {
                    "title": "创建时间",
                    "key": "createTime",
                    "width": 120,
                    "sortable": true
                },
                {
                    "title": "备注",
                    "key": "remark",
                    "min-width": 150,
                    "sortable": true
                },

            ],
            //表格数据
            data_list: [],

        }
    },
    methods: {

    },
    mounted() {


    },
    props: ['insId'],
    watch: {
        insId: function (newValue, oldValue) {
            var _self = this;

            //初始化表单数据
            this.$ajax.get(_self.init_url + newValue)
                .then(function (response) {
                    _self.data_list = response.data;
                    console.log(_self.data_list);
                })
                .catch(function (error) {
                    console.log(error);
                });
        }
    }
}
</script>

<style>
.btn-group {
    margin-bottom: 5px;
}
</style>
